
package com.chongchong.user.feign;


import com.chongchong.core.launch.constant.AppConstant;
import com.chongchong.system.entity.EmailTemplate;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * email Feign接口类
 *
 * @author
 */
@FeignClient(
	value = AppConstant.APPLICATION_USER_NAME,
	fallback = IUserClientFallback.class
)
public interface IEmailClient {

	String API_PREFIX = "/email";

	/**
	 *  查询邮件模板
	 * @param group
	 * @param type
	 * @return
	 */
	@GetMapping(API_PREFIX + "/getTemplate")
	public EmailTemplate getTemplate(@RequestParam String group, @RequestParam Integer type);

	/**
	 * 根据模板id查询邮件模板
	 * @param templateId
	 * @return
	 */
	@GetMapping(API_PREFIX + "/findByTemplateId")
	EmailTemplate findByTemplateId(@RequestParam("templateId") String templateId);
}
